<%@ page contentType="text/html;charset=UTF-8" isErrorPage="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="org.slf4j.Logger,org.slf4j.LoggerFactory"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>500 - Internal Error</title>
	<script language="javascript">
		function showDetail()
		{
			document.getElementById('detail_error_msg').style.display='inline';
		}
	</script>
</head>
<%
	Throwable ex = null;
	if (exception != null)
		ex = exception;
	if (request.getAttribute("javax.servlet.error.exception") != null)
		ex = (Exception) request.getAttribute("javax.servlet.error.exception");

	//记录日志
	Logger logger = LoggerFactory.getLogger("500.jsp");
	logger.error(ex.getMessage(), ex);
	
%>

<body>
<div id="pagePrefix"></div>
<div class="boxHolder1">
<div class="boxHolder2">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="589"><img src="${ctx}/images/logo.gif" border="0"/></td>
  </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="100%" bgcolor="#6699cc" height="2"></td>
  </tr>
</table>
</div>
</div>

<h1>Internal Error.</h1>
<span>Please contact Help Desk at XXX</span>

<br/>

	<div id="content">
	<h3>Internal Error: <br><%=ex.getMessage()%></h3>
	<br>

	<button onclick="history.back();">Back</button>
	<br>
	<p><a href="#" onclick="showDetail();">Administrator click here to get the detail.</a></p>

	<div id="detail_error_msg" style="display:inline">
		<pre><%ex.printStackTrace(new java.io.PrintWriter(out));%></pre>
	</div>
	</div>
</body>
</html>
